<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=no" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>IFPlanner智能理财规划系统会员</title>
    <script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
    <script src="js/jquery/jquery-1.8.3.min.js"></script>
    <script type="text/javascript" src="http://pv.sohu.com/cityjson?ie=utf-8"></script>
    <script src="js/vue/vuedev.js"></script>
    <link rel="stylesheet" href="css/main.css"/>
    <script>
    
        try {
            var code = window.location.href.match(/code=[^&]+/)[0].split('=')[1]
        } catch (err) {
            // window.location.href = window.location.href.replace('login', 'tobuyh5').split('&code=')[0];
        }
    </script>
    <style>
    .wrap{
    width: 100vw;
    height: 100vh;
    }
    .vp{
        width: 100%;
        height: 100%;
        padding: 0 .2rem
    }
    *{
        margin: 0;
        padding: 0;
        box-sizing: border-box
    }
    input{
        -webkit-tap-highlight-color: rgba(255, 255, 255, 0); 
        -webkit-user-select: none;
        -moz-user-focus: none;
        -moz-user-select: none;
        -webkit-appearance:none;
        outline: none;
        border: none;
        font-size: .35rem
    } 
    /*注册输入框模块css*/
    .regist-component{
        padding-top: .3rem;
        background: white
    }
    .regist-component >div{
        height: .9rem;
        padding: .1rem .1rem;
        margin:.1rem .18rem .2rem;
        border-bottom: 1px solid rgba(217,217,217,1);
        margin-bottom: .6rem;
        line-height: .6rem
        
    }
    .regist-component >div:nth-child(2){
        position: relative;
    }
    .regist-component input{
       border: none;
       float: left;
       width: 100%;
       height: 100%;   
       display: block
    }
    .btn-post{
        width: 6.4rem;
        height: .8rem;
        background: #FF9400;
        color: white;
        text-align: center;
        border-radius: .4rem;
        font-size: .3rem;
        line-height: .6rem;
        margin-top: .45rem !important
    }
    .getcode-css{
        position: absolute;
        width: 1.7rem;
        height: .6rem;
        background: #FF9400;
        color: white;
        text-align: center;
        line-height: .6rem;
        font-size: .24rem;
        right: 0;
        bottom:.18rem;
        border-radius: .3rem;
    }
    /**/ 
    .sayguize{
        font-size:.26rem;
        font-family:PingFang-SC-Medium;
        font-weight:500;
        color:rgba(51,51,51,1);
        line-height:.38rem;
        padding-top:.3rem
    }
    </style>
</head>
<body>
 <div class="wrap">
   <div class="vp">
      <div style="padding-top:.2rem">
          <img  style="width:100%;"  class="banner"   src="images/login.png" alt="">
      </div>
      <div class="sayguize">尊敬的 <span class="buyperson"></span> ，您将开通IFPlanner智能理财规划系统会员，为保证会员特权成功发放到您的帐号，请输入您的手机号码</div>
      <div class="regist-component">
            <div>
                <input style="-webkit-user-select:text !important;" type="tel"  v-model="userPhone"  placeholder="请输入手机号码">
            </div>
            <div>
              <input  style="-webkit-user-select:text !important;" type="number" v-model="userCode"  placeholder="请输入验证码">
              <div class="getcode-css"   :class="{'getcode': codeflag}"   @click="getcode"   :disabled="codeflag" v-text=" countdown ||  '获取验证码'" ></div>
          </div>
          <div class="btn-post"   @click="nowbuy" >立即购买</div>
       </div>

   </div>

 </div>

<script>

 

    var created=function() {
        var _this=this
     _this.loading=false


    //  var  sessinfo  = JSON.parse(sessionStorage.courseInfo);
    //   _this.changeTitle(sessinfo.name)

    //   $('.banner').attr('src',sessinfo.titleImg)


     //用户登录验证(未注册的系统自动注册)
    _this.nowbuy=function(){
        var params={}
        params.userPhone = _this.userPhone;
        params.userCode = _this.userCode;
        // params.inviterID = window.location.href.match(/userId=[^&]+/)[0].split('=')[1];
        params.inviterID = "";
        params.registrationSource = '921';
        _this.requestFun('/financial/h5/checkCodeUserH5V1', params).then(function(data) {
               if (data.resultCode=='00001111' || data.resultCode=='00002222' || data.resultCode=='0000') {


                     /*成功页面需要信息
                    sessionStorage.userPhone=_this.userPhone
                    */
                    sessionStorage.userPhone=_this.userPhone

                    // _this.userId=data.resultData.userId
                    sessionStorage.isNewUser = 'true';
                    /*跳到购买页面*/
                    sessionStorage.setItem('user',data.resultData.userId);
                    window.location.href = window.location.href.replace('login.html', 'buy.html');
                 
               } else {
                _this.toast(data.resultMessage)
               }
            });
    }

    }

    $.get('http://wxiwin.anjintech.com/wechat/user/getOAuth2UserInfoByCode?code=' + code, function(data) {
        sessionStorage.weixinUserInfo = JSON.stringify(data.datum);
        sessionStorage.code = data.datum.openId;
        $('.buyperson').text(data.datum.nickname)
    })
</script>
<script src="js/main.js"></script>
</body>
</html>